<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="HandheldFriendly" content="true" />
		<meta name="MobileOptimized" content="320" />
		<title>postmessage</title>
		<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
		<style type="text/css" media="screen">
			.hdata {
				color: #e1673e;
				font-size: 14px;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
		</style>
	</head>

	<body>
		<header id="header">
			<div class="nvbt iback" onclick="back()"></div>
			<div class="nvtt">Barcode</div>
		</header>
		<div id="dcontent" class="dcontent">
			<div>
				<iframe id="child" src="http://cpctest.cloud.sinocc.com:88/web/sht/cpctest/sht_388.jsp?id=*6eyzJNy1dgLbipdrOb1xvDg%3D%3D~w96%3C104%3C%5E&loginguid=CPCCLOUDTEST.a.{Web_15399119206370.37430317673104396}"></iframe>
			</div>
			<br/>
			<div style="display: none;">
				<div id="sys" class="button" onclick="clicked('barcode_scan.html',true,true)">扫一扫</div>
			</div>
		</div>

	</body>
	<script type="text/javascript" src="../js/common.js"></script>
	<script type="text/javascript" src="../js/immersed.js"></script>
	<script type="text/javascript" src="../js/jquery-1.8.0.min.js"></script>
	 <script type="text/javascript">
		var frameId = document.getElementById('child');
		frameId.height = document.documentElement.clientHeight * 0.95;
		frameId.width = document.documentElement.clientWidth * 0.999;
		
        function scaned(t, message, f){
        	console.log("传值:"+message);
            window.frames[0].postMessage(message,'http://cpctest.cloud.sinocc.com:88');
        }

        window.addEventListener('message',function(e){
            var value=e.data;
            
            if(value == 'iotwebapp'){
            	$('#sys').trigger('onclick');
            }
            
        },false);
        
        
        
        
    </script>
</html>